package org.box.metadata.cli.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.box.metadata.cli.MetaCommandLineParser;

/** 
 * Annotation's representation of {@link org.apache.commons.cli.Option}
 * 
 * <p>Describes a single command-line option.  It maintains
 * information regarding the short-name of the option, the long-name,
 * if any exists, a flag indicating if an argument is required for
 * this option, and a self-documenting description of the option.</p>
 * 
 * <p>Annotation applies for class's fields. Only two field types supported
 * for such fields:
 * <li> boolean - the option has no arguments (hasArguments == false)
 * <li> String - the option may have arguments (hasArguments == true)
 * </p>
 *
 * @see org.apache.commons.cli.Option
 * @see MetaCommandLineParser
 *
 * @author <a href="mailto:alexander.box@gmail.com">Alexander Korobka</a>
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Option {

	String shortName();
	
	String fullName();
	
	boolean hasArguments() default false;
	
	String description();
}
